package com.hmall.api.feign;

import java.util.Collection;
import java.util.List;

import com.hmall.api.config.DefaultFeignConfig;
import com.hmall.api.dto.ItemDTO;
import com.hmall.api.feign.fallback.SearchRemoteFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: 龙玉虎 yuhu.long@hand-china.com
 * @CreateTime: 2025-04-07
 * @Description: 查询服务
 */

@FeignClient(value = "search-service", configuration = DefaultFeignConfig.class, fallbackFactory = SearchRemoteFallback.class)
public interface SearchRemote {

    @GetMapping("/search")
    List<ItemDTO> queryItemByIds(@RequestParam("ids") Collection<Long> ids);
}
